﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SynergyLib.SMath;

namespace SynergyLib.DSP
{
    public static class DelayBasedEffects
    {
        public static double Delay(float input, float delayMS, int index, float modFreq, int sampleRate)
        {
            return (input + (1 - delayMS) * (System.Math.Sin(Trig.TwoPI * index * modFreq / sampleRate)));
        }
    }
}
